#ifndef DATA_TYPES_H
#define DATA_TYPES_H

#include <QString>
#include <QtXml>

struct activity {
  int id;
  int user_id;
  int recommend_user;
  int organizer_id;
  int calendar_id;
  QString name;
  QString english_name;
  QString location;
  QString address;
  QString english_address;
  QString category;
  QString subcate;
  QString tags;
  QString lat;
  QString lng;
  QString match_level;
  QString show_image_url;
  QString thumb_image_url;
  int view_count;
  int comment_count;
  int recommend_count;
  int checkin_count;
  int subscribe_count;
  int rank;
  QString access_type;
  bool is_auth;
  bool is_long;
  bool is_past;
  bool is_movie;
  QString start_time;
  QString end_time;
  QString created_on;
  QString body;
  QString description;
};

struct cate {
  QString cn_cate;
  QString en_cate;
  QString sign;
  QString icon_url;
};

struct tag {
  QString tag_name;
};

struct place {
    int id;
    int user_id;
    int recommend_user;
    QString name;
    QString sub_name;
    QString full_name;
    QString enlish_name;
    QString category;
    QString subcate;
    QString tags;
    QString location;
    QString address;
    QString english_address;
    QString show_image_url;
    QString thumb_image_url;
    QString district;
    QString region;
    QString contact;
    QString website;
    bool p_verify;
    bool backup_verity;
    int home_id;
    QString home_name;
    QString around_list;
    int price_option;
    int zonghe_sort;
    int huanjing_sort;
    int fuwu_sort;
    int zhiliang_sort;
    int xingjiabi_sort;
    int kouwei_sort;
    int rank;
    int order_rank;
    int star_count;
    int view_count;
    int comment_count;
    int recommend_count;
    int checkin_count;
    int aibang_id;
    int dianping_id;
    int koubei_id;
    QString lat;
    QString lng;
    int match_level;
    QString coordinate_x;
    QString coordinate_y;
    QString created_on;
    QString updated_on;
    QString last_comment_time;
    QString body;
    QString description;
};

int parse_activity(QDomElement &e, activity &a);
int parse_cate(QDomElement &e, cate &c);
int parse_place(QDomElement &e, place &p);

#endif // DATA_TYPES_H
